/* PDF Viewer Styles */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

:root {
    /* Light Theme - Modern & Futuristic */
    --primary-color: #6366f1; /* Indigo */
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary-color: #334155;
    --accent-color: #f43f5e; /* Rose */
    --text-color: #1e293b;
    --text-light: #64748b;
    --background-color: #f8fafc;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --dark-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --light-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --particle-color: rgba(99, 102, 241, 0.3);
    --pdf-bg: #f1f5f9;
    --loader-bg: rgba(255, 255, 255, 0.9);
    --drop-area-bg: rgba(248, 250, 252, 0.98);
    --modal-overlay: rgba(15, 23, 42, 0.7);
    --constellation-color: rgba(99, 102, 241, 0.3);
}

/* Dark Theme Variables - Futuristic */
.dark-theme {
    --primary-color: #818cf8;
    --primary-light: #a5b4fc;
    --primary-dark: #6366f1;
    --secondary-color: #e2e8f0;
    --accent-color: #fb7185;
    --text-color: #f8fafc;
    --text-light: #cbd5e1;
    --background-color: #0f172a;
    --border-color: #334155;
    --card-bg: #1e293b;
    --dark-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --light-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
    --particle-color: rgba(129, 140, 248, 0.3);
    --pdf-bg: #0f172a;
    --loader-bg: rgba(15, 23, 42, 0.9);
    --drop-area-bg: rgba(15, 23, 42, 0.98);
    --modal-overlay: rgba(0, 0, 0, 0.8);
    --constellation-color: rgba(129, 140, 248, 0.4);
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Particle Background */
.particles-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.8;
    overflow: hidden;
}

/* Fallback constellation animations */
.constellation-star {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light, #818cf8) 0%, transparent 70%);
    box-shadow: 0 0 10px 2px var(--primary-color, #6366f1);
    animation: twinkle 3s infinite alternate;
}

.constellation-line {
    position: absolute;
    background: linear-gradient(to right, transparent, var(--constellation-color, rgba(99, 102, 241, 0.3)) 50%, transparent);
    height: 2px !important;
    transform-origin: 0 0;
    animation: lineOpacity 10s infinite;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

@keyframes lineOpacity {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

.constellation-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

#space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background-color: var(--particle-color);
    pointer-events: none;
    opacity: 0;
    animation: float-particle var(--duration) ease-in-out infinite;
}

@keyframes float-particle {
    0% {
        transform: translate(0, 0);
        opacity: 0;
    }
    25% {
        opacity: var(--opacity);
    }
    75% {
        opacity: var(--opacity);
    }
    100% {
        transform: translate(var(--distance-x), var(--distance-y));
        opacity: 0;
    }
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.75rem;
    background-color: var(--card-bg);
    box-shadow: var(--light-shadow);
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 600;
}

.logo i {
    color: var(--accent-color);
    font-size: 2.2rem;
}

.logo h1 {
    font-size: 1.6rem;
    color: var(--text-color);
}

.logo h1 span {
    color: var(--primary-color);
}

.file-name {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 350px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.3rem 0.85rem;
    border-radius: 8px;
    background-color: var(--background-color);
}

/* Button Styles */
.btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn i {
    font-size: 1.2rem;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    border-radius: 12px;
    padding: 0.7rem 1.5rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.primary-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.primary-btn:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.primary-btn:hover::before {
    transform: translateX(100%);
}

.primary-btn i {
    font-size: 1.4rem;
    margin-right: 0.5rem;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

.primary-btn .btn-text {
    font-weight: 600;
}

.secondary-btn {
    background-color: var(--background-color);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: var(--primary-light);
    color: white;
}

.tool-btn {
    background-color: transparent;
    color: var(--text-color);
    padding: 0.6rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tool-btn i {
    font-size: 1.4rem; /* Increased icon size */
}

.tool-btn:hover {
    background-color: var(--background-color);
    transform: translateY(-2px);
}

.icon-btn {
    background-color: transparent;
    color: var(--text-light);
    padding: 0.6rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    z-index: 1;
}

.icon-btn i {
    font-size: 1.4rem; /* Increased icon size */
    transition: all 0.3s ease;
}

.icon-btn:hover {
    color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.icon-btn:active {
    transform: translateY(0);
}

/* Theme toggle button special styling */
#theme-toggle {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.dark-theme #theme-toggle {
    background: rgba(165, 180, 252, 0.1);
    box-shadow: 0 0 10px rgba(129, 140, 248, 0.3);
}

#theme-toggle:hover {
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 0 15px var(--primary-color);
}

#theme-toggle i {
    font-size: 1.6rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Main Content */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.75rem;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.zoom-controls, .page-controls, .view-controls {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.page-info {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

#zoom-level {
    font-size: 1rem;
    min-width: 60px;
    text-align: center;
    color: var(--text-color);
    font-weight: 500;
}

/* PDF Container */
.pdf-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
    position: relative;
    background-color: var(--pdf-bg);
}

#pdf-canvas {
    display: block;
    box-shadow: var(--dark-shadow);
    background-color: white;
    margin: 20px auto;
    border-radius: 4px;
}

/* Navigation arrows for PDF */
.nav-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
    transform: translateY(-50%);
}

.nav-arrow {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--dark-shadow);
    transition: all 0.3s ease;
    pointer-events: auto;
    color: var(--primary-color);
    opacity: 0.8;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.nav-arrow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dark-theme .nav-arrow {
    background-color: rgba(30, 41, 59, 0.3);
    color: var(--primary-light);
}

.nav-arrow:hover {
    background-color: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-color);
}

.dark-theme .nav-arrow:hover {
    background-color: rgba(30, 41, 59, 0.5);
    box-shadow: 0 0 20px var(--primary-color);
}

.nav-arrow:hover::before {
    opacity: 0.2;
}

.nav-arrow i {
    font-size: 1.8rem;
    z-index: 1;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.5));
}

.nav-arrow.prev {
    left: 20px;
}

.nav-arrow.next {
    right: 20px;
}

/* Drop Area */
.drop-area {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--drop-area-bg);
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
    z-index: 3;
}

.drop-area.active {
    background-color: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.drop-message {
    text-align: center;
    color: var(--text-color);
    background-color: rgba(var(--card-bg), 0.8);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: var(--dark-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 500px;
    transform: translateY(0);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.drop-message:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.drop-message i {
    font-size: 5rem; /* Increased icon size */
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 5px 15px rgba(99, 102, 241, 0.4));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.drop-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -text-fill-color: transparent;
}

.drop-message p {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.file-input-label {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.file-input-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
}

.file-input-label:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.5);
}

.file-input-label:hover::before {
    left: 100%;
}

/* Sidebar */
.sidebar {
    position: absolute;
    top: 0;
    left: -280px;
    height: 100%;
    width: 280px;
    background-color: var(--card-bg);
    box-shadow: var(--dark-shadow);
    transition: transform 0.3s ease;
    z-index: 5;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.sidebar.open {
    transform: translateX(280px);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    font-size: 1.3rem;
}

.thumbnails {
    flex: 1;
    overflow-y: auto;
    padding: 1.2rem;
}

.thumbnails-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    padding: 15px;
    max-height: calc(100vh - 120px);
    width: 180px;
    background: rgba(250, 250, 252, 0.03);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.dark-theme .thumbnails-container {
    background: rgba(13, 14, 30, 0.6);
}

.thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
}

.thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.25);
}

.thumbnail canvas, .thumbnail-placeholder {
    width: 100%;
    height: auto;
    display: block;
}

.thumbnail-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.03));
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

.thumbnail-number {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    backdrop-filter: blur(3px);
}

.thumbnail.active {
    border-color: #6366f1;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

/* Dark theme specific thumbnail styles */
.dark-theme .thumbnail {
    background: rgba(30, 30, 40, 0.7);
}

.dark-theme .thumbnail-placeholder {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(30, 30, 60, 0.5));
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 1rem 0.6rem;
    cursor: pointer;
    z-index: 5;
    box-shadow: var(--light-shadow);
}

.sidebar-toggle i {
    color: var(--text-light);
    transition: transform 0.3s ease;
    font-size: 1.3rem; /* Increased icon size */
}

.sidebar.open + .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--loader-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.loader.active {
    opacity: 1;
    visibility: visible;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--dark-shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.loader-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--primary-color));
    background-size: 200% 100%;
    animation: loadingBar 2s linear infinite;
}

@keyframes loadingBar {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

.loader-text {
    margin-top: 1.5rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.spinner {
    width: 70px;
    height: 70px;
    position: relative;
}

.spinner:before, .spinner:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid transparent;
}

.spinner:before {
    border-top-color: var(--primary-color);
    border-bottom-color: var(--accent-color);
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.spinner:after {
    border-left-color: var(--primary-light);
    border-right-color: var(--primary-dark);
    animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.hidden {
    display: none !important;
}

/* Keyboard Shortcuts Hint */
.keyboard-hint {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: var(--card-bg);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    box-shadow: var(--light-shadow);
    z-index: 5;
    pointer-events: none;
    opacity: 0.7;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.keyboard-hint span {
    display: inline-block;
    background-color: var(--background-color);
    padding: 3px 6px;
    border-radius: 4px;
    margin: 0 3px;
    border: 1px solid var(--border-color);
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--modal-overlay);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--card-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: var(--dark-shadow);
    overflow: hidden;
}

.modal-header {
    padding: 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.3rem;
}

.modal-body {
    padding: 1.8rem;
    color: var(--text-color);
    font-size: 1.1rem;
}

.modal-footer {
    padding: 1.2rem;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

/* Constellation styling */
.constellation-star {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    box-shadow: 0 0 10px 2px var(--primary-color);
    animation: twinkle 3s infinite alternate;
}

.constellation-line {
    position: absolute;
    background: linear-gradient(to right, transparent, var(--constellation-color) 50%, transparent);
    height: 2px !important;
    transform-origin: 0 0;
    animation: lineOpacity 10s infinite;
}

@keyframes twinkle {
    0% { opacity: 0.2; }
    100% { opacity: 1; }
}

@keyframes lineOpacity {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

/* Three.js container */
#space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

/* Constellation container */
.constellation-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

/* Enhanced Mobile Layout */
@media screen and (max-width: 768px) {
    .header-right {
        gap: 0.75rem;
    }
    
    .btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .icon-btn, .tool-btn {
        padding: 0.5rem;
    }
    
    .tool-btn i, .icon-btn i {
        font-size: 1.6rem; /* Even bigger icons on mobile */
    }
    
    #theme-toggle {
        width: 38px;
        height: 38px;
    }
    
    #theme-toggle i {
        font-size: 1.5rem;
    }
    
    .primary-btn {
        padding: 0.6rem 1.2rem;
    }
    
    .primary-btn i {
        font-size: 1.5rem;
    }
    
    .header-left {
        max-width: 60%;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
    
    .logo i {
        font-size: 1.8rem;
    }
    
    .file-name {
        max-width: 130px;
        font-size: 0.9rem;
    }
    
    .toolbar {
        flex-wrap: wrap;
        gap: 0.6rem;
        padding: 0.6rem 1rem;
        justify-content: center;
    }
    
    .page-info {
        font-size: 0.9rem;
    }
    
    #zoom-level {
        font-size: 0.9rem;
        min-width: 50px;
    }
    
    .sidebar {
        width: 85%;
        max-width: 300px;
        left: -100%;
    }
    
    .sidebar.open {
        transform: translateX(100%);
    }
    
    .pdf-container {
        padding: 0 10px;
    }
    
    #pdf-canvas {
        max-width: 100% !important;
        height: auto !important;
        margin: 10px auto;
    }
    
    .keyboard-hint {
        display: none;
    }
    
    /* Improved navigation arrows for mobile */
    .nav-arrows {
        bottom: 25px;
        top: auto;
        transform: none;
        padding: 0;
        justify-content: center;
        gap: 30px;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
        position: relative;
        left: auto;
        right: auto;
        bottom: 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    }
    
    .nav-arrow i {
        font-size: 1.4rem;
    }
    
    .nav-arrow.prev {
        left: 0;
    }
    
    .nav-arrow.next {
        right: 0;
    }
    
    .nav-arrow:hover {
        transform: scale(1.05);
    }
    
    /* Loader adjustments */
    .loader-content {
        padding: 1.8rem;
        width: 85%;
        max-width: 320px;
    }
    
    .spinner {
        width: 60px;
        height: 60px;
    }
    
    .loader-text {
        font-size: 1rem;
    }
    
    /* Drop area adjustments */
    .drop-message {
        padding: 2rem;
        width: 90%;
        max-width: 350px;
    }
    
    .drop-message i {
        font-size: 3.5rem;
    }
    
    .drop-message h2 {
        font-size: 1.6rem;
    }
    
    .drop-message p {
        font-size: 1rem;
    }
    
    .file-input-label {
        padding: 0.6rem 1.4rem;
        font-size: 1rem;
    }
    
    /* Thumbnail improvements */
    .thumbnails-container {
        flex-direction: row;
        width: 100%;
        max-height: 120px;
        height: 120px;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        padding: 10px;
        gap: 10px;
        border-right: none;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
        background: rgba(15, 23, 42, 0.8);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        scrollbar-width: thin;
        scrollbar-color: rgba(99, 102, 241, 0.5) rgba(15, 23, 42, 0.5);
    }
    
    .thumbnails-container::-webkit-scrollbar {
        height: 6px;
    }
    
    .thumbnails-container::-webkit-scrollbar-track {
        background: rgba(15, 23, 42, 0.5);
        border-radius: 3px;
    }
    
    .thumbnails-container::-webkit-scrollbar-thumb {
        background: rgba(99, 102, 241, 0.5);
        border-radius: 3px;
    }
    
    .thumbnail {
        flex: 0 0 auto;
        width: 80px;
        height: 100px;
        margin-right: 8px;
        display: inline-block;
        transition: all 0.3s ease;
        transform-origin: bottom center;
    }
    
    .thumbnail:last-child {
        margin-right: 0;
    }
    
    .thumbnail:hover {
        transform: translateY(-5px) scale(1.05);
    }
    
    .thumbnail.active {
        transform: translateY(-8px) scale(1.1);
        box-shadow: 0 8px 15px rgba(99, 102, 241, 0.5);
    }
    
    .thumbnail-placeholder {
        min-height: unset;
        height: 100%;
    }
    
    .thumbnail-number {
        font-size: 0.65rem;
        padding: 1px 6px;
    }
    
    /* Add a scroll indicator for mobile */
    .thumbnails-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        height: 100%;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(15, 23, 42, 0.8));
        pointer-events: none;
        z-index: 2;
    }
    
    /* Show scrolling hint animation */
    @keyframes scrollHint {
        0% { transform: translateX(0); opacity: 0.7; }
        50% { transform: translateX(10px); opacity: 1; }
        100% { transform: translateX(0); opacity: 0.7; }
    }
    
    .thumbnails-container::before {
        content: '→';
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.7);
        font-size: 1.5rem;
        animation: scrollHint 2s ease-in-out infinite;
        z-index: 3;
        pointer-events: none;
    }
    
    /* Mobile landscape orientation improvements */
    @media (orientation: landscape) {
        .nav-arrows {
            top: 50%;
            bottom: auto;
            transform: translateY(-50%);
            justify-content: space-between;
            padding: 0 20px;
            width: 100%;
        }
        
        .nav-arrow.prev {
            left: 20px;
        }
        
        .nav-arrow.next {
            right: 20px;
        }
        
        .pdf-container {
            padding: 0 50px;
        }
        
        .toolbar {
            padding: 0.5rem 1rem;
        }
        
        header {
            padding: 0.6rem 1.2rem;
        }
    }
} 